<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  
 <style>
body{background:url(images/main_bg_03.png) repeat;}
.list-content {
    width:802px;
	height:540px;
	font-size:12px;
	text-align:left;
	border:2px solid #92b0c6;
	color:#666;
	display:inline-block;
}
.list_page{
    margin-right:10px;
	margin-top:5px;
	width: 802px;
	line-height:18px;
	font-size:12px;
	text-align:right;
	color:#666;
	display:inline;
	float:left; 
}
.list_page_text{
	color:#146185;
	}
.td01{
	width:6px;
	padding-left:3px;
	}
.btn01 {
	width:44px;
	height:28px;
	background:url(images/btn_list.png) no-repeat;
	display:inline;
}

a{text-decoration:none;color:#666;}
a:hover{color:#FF9900;}
</style>
    <base href="<%=basePath%>">
    
    <title>My JSP 'list.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script type="text/javascript" src="web/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
function modifyBaseInfo(id){
	if (confirm("是否确认更改"))  
	{  
		$.ajax({
				type: "POST",
				url: "updateBaseInfo.action",
				dateType: "json",
				data: {"id": $("#"+id+"id").val(),"name": $("#"+id+"title").val(), "content": $("#"+id+"content").val()},
					success: function(returnedData){
						
						var json = eval( "("+returnedData+")" );
						alert(json.confirmUpd);
				}
			});
	}  
	else  
	{ 
	return false;
	};
}


</script>
  </head>
  
  <body>
  
  <div class="list-content"> 
  <br/>
  <br/>
	  <table  width="auto" cellpadding="1" cellspacing="2" >
	 
	
		<s:iterator value="baseInfoList" var="val">
	    <tr >
		  <td class="td01" width="10px"><img src="images/li.gif" border="0" width="3" height="3" /></td>
		  <td width="170"><input  style="background:grey" type="text" id="<s:property value="#val.id"/>id"  value="<s:property value="#val.id"/>" readonly/></td>
		  <td width="170"><input  maxlength="50" style="width:200px" type="text" id="<s:property value="#val.id"/>title"  value="<s:property value="#val.name"/>" /></td>
		  <td width="170"><input maxlength="200" style="width:200px" type="text" id="<s:property value="#val.id"/>content"  value="<s:property value="#val.content"/>" /></td>
		  <td > <input type="button" id="modify" onclick="modifyBaseInfo(<s:property value="#val.id"/>);"   name="modify" value="修改"  style="width:42px; height:24px; border:none; background:url(images/btn_list.png) no-repeat;margin-right:2px; cursor:pointer; display:inline;" /></td>
		</tr>
		</s:iterator>
	  </table> 
	</div>
	

         
         
     
  </body>
</html>
